<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>js严格模式</title>
    <script>
        function func(){
            //严格模式
            "use strict";

            //a = 1;
        }

        func();   //报错， a is not defined


        //eval()方法：动态执行js代码
        eval("var a = 2 + 3;");
        console.log(a);   //5
    </script>
</head>
<body>

</body>
</html>